package main

type Animal interface {
	Speak() string
}

type Dog struct {
}

func (g *Dog) Speak() string {
	return "Woof!"
}

type Cat struct {
}

func (c *Cat) Speak() string {
	return "Meow!"
}

func main() {
	animals := []Animal{&Dog{}, &Cat{}}
	for _, animal := range animals {
		animal.Speak()
	}

	/*
		result
			Woof!
			Meow!
	*/
}
